/**
 * 
 */
package lex.explorer.directory;

import java.io.File;
import java.util.Arrays;
import javax.swing.filechooser.FileSystemView;

public class FileSystemRootNode extends FileTreeNode {
	private static FileSystemView fsv = FileSystemView.getFileSystemView();

	public FileSystemRootNode() {
		super(new File("/"));
	}

	protected void loadChildren()
	{
		File[] roots = fsv.getRoots();
		if( roots != null )
		{
			Arrays.sort( roots );
			for( File root : roots )
				add( new FileTreeNode( root ) );
		}
	}

	public String toString() {
		return "/";
	}
}
